/* I2C interface headers */

/* Copyright (C) 2009 David Zanetti
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; version 2 of the License.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#define I2C_H

/* issue a read or write command to the addressed device */
/* if read, then up to len bytes will be read into the buffer */
/* if write, then up to len buyes will be sent from the buffer */
/* returns number of buffer bytes read/written */

uint8_t i2c_read(uint8_t devaddr, uint8_t addr, uint8_t *bytes, int8_t len);

/* init i2c space */
void i2c_init(void);


